package press.xiang.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import press.xiang.entity.Commodity;
import press.xiang.entity.CommodityVO;
import press.xiang.mapper.CommodityMapper;
import press.xiang.service.ICommodityService;

import java.util.List;

/**
 * @author xiang
 * @version 1.0
 * @description: TODO
 * @date 2022/4/21 6:34 下午
 */
@AllArgsConstructor
@Service
public class CommodityServiceImpl extends ServiceImpl<CommodityMapper, Commodity> implements ICommodityService {

    private final CommodityMapper commodityMapper;

    @Override
    public void truncateCommodity(){
        commodityMapper.truncateCommodity();
    }

    @Override
    public List<CommodityVO> queryStoreByCommodity(){
        return commodityMapper.queryStoreByCommodity();
    }

    @Override
    public List<CommodityVO> queryStoreByCount() {
        return commodityMapper.queryStoreByCount();
    }

    @Override
    public List<Commodity> getCommodityByStore(String id) {
        return commodityMapper.getCommodityByStore(id);
    }


}
